<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/saleproductdetailfolder/SaleProductDetails.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/saleproductdetailfolder/SaleProductDetails.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'SaleProductDetailsId',
                footer: "Foots",
                cnName: '销售产品详情表',
                name: 'saleproductdetailfolder/SaleProductDetails',
                url: "/SaleProductDetails/",
                sortName: "SaleProductDetailsId"
            });
            const editFormFields = ref({"SaleProductDetailsId":"","MarketId":"","ProductId":"","ProductNum":""," InventoryOutNum":"","OrderTotal":""});
            const editFormOptions = ref([[{"title":"详情ID","required":true,"field":"SaleProductDetailsId","disabled":true}],
                              [{"title":"销售编号","field":"MarketId"}],
                              [{"title":"产品编号","field":"ProductId"}],
                              [{"title":"产品数量","field":"ProductNum","type":"number"}],
                              [{"title":"出库数量","field":" InventoryOutNum","type":"number"}],
                              [{"title":"订单总额","field":"OrderTotal","type":"decimal"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'SaleProductDetailsId',title:'详情ID',type:'string',sort:true,width:220,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'MarketId',title:'销售编号',type:'string',width:220,align:'left',sort:true},
                       {field:'ProductId',title:'产品编号',type:'string',width:220,align:'left'},
                       {field:'ProductNum',title:'产品数量',type:'int',width:110,align:'left'},
                       {field:' InventoryOutNum',title:'出库数量',type:'int',width:110,align:'left'},
                       {field:'OrderTotal',title:'订单总额',type:'decimal',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
